How Web Programming Could Make Betty Draper a Better Mother by Ali Akbar & Zico Pratama Putra

How Web Programming Could Make Betty Draper a Better Mother by Ali Akbar & Zico Pratama Putra

Author:Ali Akbar & Zico Pratama Putra [Akbar, Ali]
Language: eng
Format: azw3
Publisher: Kanzul Ilmi Press
Published: 2017-05-02T04:00:00+00:00


<html>

<head>

<title>

Casting, changing data type

</title>

</head>

<body>

<h1> Casting, changing data type </h1>

<?php

$initial_variable = 100.178;

echo "Initial variable=".$initial_variable."<br/>";

echo "Casting results:<br/>";

$casting_result = ( double ) $initial_variable;

echo gettype( $casting_result ) ;

echo " = $casting_result<br />";

$casting_result = ( string ) $initial_variable;

echo gettype( $casting_result );

echo " = $casting_result<br />";

$casting_result = ( integer ) $initial_variable;

echo gettype( $casting_result );

echo " = $casting_result<br />";

$casting_result = ( double ) $initial_variable;

echo gettype( $casting_result );

echo " = $casting_result<br />";

$casting_result = ( boolean ) $initial_variable;

echo gettype( $casting_result );

echo " = $casting_result<br />";

?>

</body>

</html>

If you open the code in browser, you’ll see following pic:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.